package NiuKe;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * 从非负整数序列 0, 1, 2, ..., n中给出
 * 包含其中n个数的子序列，请找出未出现在该子序列中的那个数。
 */
public class SequenceFnumber {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int result = 0;
        for (int i = 1; i <= n; i++) {
            result ^= i;
        }
        for (int i = 0; i < n; i++) {
            int val = in.nextInt();
            result ^= val;
        }
        System.out.println(result);
    }
}
